package com.wish.group05.system.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "zhenziyun.sms")
public class SmsProperties implements InitializingBean {
    private String apiUrl;
    private String appId;
    private String appSecret;
    private String templateId;

    public static String API_URL;
    public static String APP_ID;
    public static String APP_SECRET;
    public static String TEMPLATE_ID;


    @Override
    public void afterPropertiesSet() throws Exception {
        API_URL=this.apiUrl;
        APP_ID=this.appId;
        APP_SECRET=this.appSecret;
        TEMPLATE_ID=this.templateId;
    }
}
